package com.doraz.orb.structs;

import android.content.Context;
import android.view.Display;
import android.view.WindowManager;

public class User implements OrbObject {

	private String username;
	private String password = "";
	private String sessionId = null;
	
	private int streamSpeed = -1;
	private int screenHeight = 0;
	private int screenWidth = 0;
	private boolean remPassword = false;
	
	public User(String username) {
		this.username = username;
	}

	@Override
	public int getObjectType() {
		return OrbObject.ORB_USER;
	}
	
	/**
	 * Sets the screen dimension
	 * 
	 * @param ctx
	 */
	public void detectScreenDimensions(Context ctx) {
		Display display = ((WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
		this.screenWidth = display.getWidth();
		this.screenHeight = display.getHeight();
	}

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the sessionId
	 */
	public String getSessionId() {
		return sessionId;
	}

	/**
	 * @param sessionId the sessionId to set
	 */
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	/**
	 * @return the streamSpeed
	 */
	public int getStreamSpeed() {
		return streamSpeed;
	}

	/**
	 * @param streamSpeed the streamSpeed to set
	 */
	public void setStreamSpeed(int streamSpeed) {
		this.streamSpeed = streamSpeed;
	}

	/**
	 * @return the screenHeight
	 */
	public int getScreenHeight() {
		return screenHeight;
	}

	/**
	 * @param screenHeight the screenHeight to set
	 */
	public void setScreenHeight(int screenHeight) {
		this.screenHeight = screenHeight;
	}

	/**
	 * @return the screenWidth
	 */
	public int getScreenWidth() {
		return screenWidth;
	}

	/**
	 * @param screenWidth the screenWidth to set
	 */
	public void setScreenWidth(int screenWidth) {
		this.screenWidth = screenWidth;
	}

	/**
	 * @return the remPassword
	 */
	public boolean isRemPassword() {
		return remPassword;
	}

	/**
	 * @param remPassword the remPassword to set
	 */
	public void setRemPassword(boolean remPassword) {
		this.remPassword = remPassword;
	}
}
